﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Menuleft.ascx.cs" Inherits="BookStore.Controls.Menuleft" %>
<script type="text/javascript">
$(document).ready(function() {
	$('li.cat-header ul').each(function(index) {
 $(this).prev().addClass('idCatSubcat')});
 $('li.cat-header a').after('<span></span>'); 
 $('li.cat-header ul').css('display','none');
 $('li.cat-header ul.active').css('display','block');
 $('li.cat-header ul').each(function(index) {
   $(this).prev().addClass('close').click(function() {
  if (
   $(this).next().css('display') == 'none') {
   $(this).next().slideDown(400, function () {
   $(this).prev().removeClass('collapsed').addClass('expanded');
    });
  }else {
    $(this).next().slideUp(400, function () {
   $(this).prev().removeClass('expanded').addClass('collapsed');
   $(this).find('ul').each(function() {
    $(this).hide().prev().removeClass('expanded').addClass('collapsed');
   });
    });
  }
  return false;
   });
});
 	$('.box-category li').last().addClass('last');
	$('.box-category li li').last().addClass('last');
 });
</script>
<div id="column-left">
<div class="box category">

	<div class="box-heading">Categories</div>
  <div class="box-content">
  <div class="box-category">
    <div class="box-category">
        <ul  id="ulParent">

         <asp:Repeater ID="rpListParentProduct" runat="server" OnItemDataBound="rpListParentProduct_ItemDataBound">
            <ItemTemplate>
            <li class="cat-header"> <a  class="idCatSubcat" href="Category.aspx?catogoryID=<%# Eval("catogoryID")%>"><%# Eval("catogryName")%></a>
            <span class="close"></span>
               <ul id="ulChildrent">
                    <asp:Repeater ID="rpListChildProduct" runat="server">
                        <ItemTemplate>
                            <li><a href="Category.aspx?catogoryID=<%# Eval("catogoryID")%>"> <%#Eval("catogryName")%>
                            </a></li>
                        </ItemTemplate>
                    </asp:Repeater>
                </ul>
            </li>
            <asp:HiddenField ID="hrID" runat="server" Value='<%#Eval("catogoryID") %>' />
            
            </ItemTemplate>    
      </asp:Repeater>
     </ul>
    </div>
  </div>
</div></div>

 
<div class="box  bestsellers">
  <div class="box-heading">Bestsellers</div>
  <div class="box-content">
    <div class="box-product-2">
    	<ul>
            <asp:DataList ID="DataList1" runat="server">
            <ItemTemplate>
            <li>
            <div class="image"><a href="<%# Eval("productID") %>"><asp:LinkButton ID="lbnimg" runat="server" 
                            CommandArgument='<%# Eval("productId") %>' onclick="lbnimg_Click"> <asp:Image ID="Image1" runat="server" ImageUrl='<%# "/image/Catalog/"+Eval("images") %>' Width="56px" Height="82px" /> </asp:LinkButton></a></div>
                  <div class="extra-wrap">
                     <div class="name maxheight-best"> 
                         
                         <asp:LinkButton ID="lnbname" runat="server" CommandArgument='<%# Eval("productId") %>' 
                             Text='<%# Eval("productName") %>' onclick="lnbname_Click"></asp:LinkButton>
                             </div>
                             
                   <div class="price">
                  <span class="price-new"><asp:Label ID="Label1" runat="server" Text='<%# Eval("price", "{0:C}") %>'></asp:Label></span><span class="price-old"></span>
                </div>                       
             </div>
          </li>
           </ItemTemplate>
          </asp:DataList>
           
        </ul>
    </div>
  </div>
</div>
 </div>



